<template>
  <a-button class="audit-pass" type="primary" @click="auditPass()">
    <template #icon><UserOutlined /></template>
    审核通过
  </a-button>
</template>

<script lang="ts" setup>
import { ExclamationCircleOutlined, UserOutlined } from '@ant-design/icons-vue'
import { Modal } from 'ant-design-vue'
import { createVNode } from 'vue'

const emit = defineEmits(['auditPass'])
const auditPass = (): void => {
  Modal.confirm({
    title: '请确认审核通过',
    content: `是否确认审核通过？`,
    icon: createVNode(ExclamationCircleOutlined),
    onOk: () => {
      emit('auditPass')
    },
    okText: '通过',
    cancelText: '取消',
  })
}
</script>

<style lang="less" scoped>
.audit-pass {
  width: 110px;
  height: 32px;
  background: #009e58;
  border-radius: 8px;
  border: 1px solid #ffffff;
}
</style>
